package com.wz.utils.transaction.jdbctemplate;

import com.wz.utils.transaction.jdbctemplate.pojo.User;
import com.wz.utils.transaction.jdbctemplate.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author : Wang Zhen.
 * @Date : Created in 17:02 2022/12/20
 * @Description :
 * @Modified By   :
 * @Version :
 */
public class JdbcTemplateTest {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext(
                "ApplicationContext.xml");
        UserService userService = (UserService) ac.getBean("userService");
        User newUser = new User(1, "小明", 17, "男");
        userService.save(newUser);
    }
}
